{% extends 'base.html' %}

{% load pp_url %}
{% load topictags %}
{% load issuetags %}
{% load consensustags %}
{% load argumenttags %}
{% load solutiontags %}
{% load commenttags %}

{% block title %}
{% if request.object %}{{ request.object.text }}{% else %}All {% endif %}{{request.dimension|title}} Solutions
{% endblock %}

{% block browser_bar %}
					<ul>
					<li><a STYLE="text-decoration:none" href="{% pp_url template='solutions.html' dimension='hot' object=request.object start=request.start end=request.end %}">{% ifequal "hot" request.dimension %}<b>hot</b>{% else %}hot{% endifequal %}</a></li> | 
					<li><a STYLE="text-decoration:none" href="{% pp_url template='solutions.html' dimension='cont' object=request.object start=request.start end=request.end %}">{% ifequal "cont" request.dimension %}<b>controversial</b>{% else %}controversial{% endifequal %}</a></li> |
						<li><a STYLE="text-decoration:none" href="{% pp_url template='solutions.html' dimension='new' object=request.object start=request.start end=request.end %}">{% ifequal "new" request.dimension %}<b>new</b>{% else %}new{% endifequal %}</a></li>
					</ul>
                    {% endblock %}

{% block content %}
	<div class="stage">
		<div class="issuemask">
        <div class="pagehead">
            {% if request.object %}
            {{request.dimension|title}} Solutions for {{request.object.name}}
                {% else %}
            All {{request.dimension|title}} Solutions
            {% endif %}
            </div>
		 <div class="issuebound">

           {% pp_get_solution_list issue=request.object dimension=request.dimension %}


                {%for iss_obj in pp_solution.solution_list%}
                    
    				   {% include '_solution.html' %}

                {% empty %}
                <div class="pagehead">
                There doesn't seem to be anything here yet.
                </div>
                
                {% endfor %}
             
            {% if pp_solution.count > 20 %}
             <div class="pagination">
                <br>
                <p><
                {% for s,e,n in request.rangelist %}

                   {% if not s > pp_solution.count %}
                    <a href="{% pp_url template='solutions.html' dimension=request.dimension object=request.object start=s end=e %}">{% ifequal s request.start %}<b>{{n}}</b>{% else %}{{n}}{% endifequal %}</a> 
                    {% endif %}

                {% endfor %}
                ></p>
            </div>	   		
           {% endif %}
           {% endpp_get_solution_list %}

        
			</div>
  <div class="rightcol">
            {% if request.object %}
            {% if request.user.is_authenticated %}
            <ul><a href="{% pp_url template='submit_solution.html' object=request.object %}" class='button blue'>Submit Solution</a></ul>
            {% else %}
<ul><a href="{% pp_url template='register.html' %}" class='button blue'>Submit Solution</a></ul>
            {% endif %}			
            {% endif %}
            {% include '_rightcol.html' %}
            </div>
		</div>
	</div>
{% endblock content %}
</body>
</html>
						

